import request from '@/utils/request'

// 获取司机信息

export const getDriverList = (params) => {
  return request({
    url: '/driver/page',
    params
  })
}
// 获取单个司机信息
export const getDetail = (id) => {
  return request({
    url: `/driver/${id}`,
    params: id
  })
}
// 获取已经停用的车辆
export function getUnWorkingTrucks() {
  return request({
    url: '/unWorkingTrucks'
  })
}

// 获取驾照信息
export function getDriverLicense(id) {
  return request({
    url: `/manager/driverLicense/${id}`
  })
}

// 保存司机信息
export function updateDriverInfo(data) {
  return request({
    url: `/manager/driver/${data.userId}`,
    data,
    method: 'put'
  })
}
